/-docs
/-editor ...
CodeMirrorEditor.ts
CompletionCodeMirrorEditor.ts
CssEditorType.ts
Editor.ts
EditorType.ts
HtmlEditorType.ts
JavaScriptEditorType.ts
TypeScriptEditorType.ts
x-last-PlainTextEditorType.ts
/-files
/-files-old
FileEntry.ts
FolderEntry.ts
impl.ts
/-imports
/-layout
/-storage
/-tests
/-typings
codemirror.d.ts
knockout.d.ts
typescriptServices.d.ts
websql.d.ts
zip.js.d.ts
TypeScriptService.ts
functions.ts
ko.ts
persistence.ts
shell.ts
teapo.html
teapo.js
teapo.ts
836
                diag.map(d => d.line() + ':' + d.character() + ' ' + d.message()).join('\n');
 
312
    }
313
314
315
    private _delayedHandleCursorActivity() {
316
      this._delayedHandleCursorActivityTimeout = 0;
317
318
      this._updateStatusText();
319
    }
320
321
    private _updateStatusText() {
322
      var doc = this.doc();
323
      var cur = doc.getCursor();
324
      var offset = doc.indexFromPos(cur);
325
326
      var statusText = cur.line + ':' + cur.ch;
327
      var def = this._typescript.service.getTypeAtPosition(this.docState.fullPath(), offset);
328
      if (def)
329
        statusText += ' ' + def.kind + ' ' + def.memberName;
330
331
      var sig = this._typescript.service.getSignatureAtPosition(this.docState.fullPath(), offset);
332
      if (sig && sig.formal && sig.formal[sig.activeFormal]) {
333
        var sigg = sig.formal[sig.activeFormal];
334
        statusText += ' ' + sigg.signatureInfo + (sigg.docComment ? '\n/** ' + sigg.docComment + ' */' : '');
335
      }
336
      else if (def && def.docComment) {
337
        statusText += '\n/**' + def.docComment + '*/';
338
      }
339
        
340
      this.statusText(statusText);
341
    }
342
343
344
    debug() {
345
      var emits = this._typescript.service.getEmitOutput(this.docState.fullPath());
346
      for (var i = 0; i < emits.outputFiles.length; i++) {
347
        var e = emits.outputFiles[i];
348
        alert(
349
          e.name + '\n\n' +
350
          e.text);
351
      }
352
    }
353
354
    build() {
355
356
      this._typescript.log = [];
357
358
      var emits = this._typescript.service.getEmitOutput(this.docState.fullPath());
359
360
      if (this._typescript.log.length || emits.emitOutputResult !== TypeScript.EmitOutputResult.Succeeded) {
361
        var msg = 
362
          'Building ' + this.docState.fullPath() + ' ' + TypeScript.EmitOutputResult[emits.emitOutputResult] + '\n' +
363
          this._typescript.log.map(msg => msg.logLevel + ' ' + msg.text).join('\n');
364
365
        if (typeof (<any>this._typescript.service).getAllSyntacticDiagnostics === 'function') {
366
          // a hack
367
          try {
368
            var diag: TypeScript.Diagnostic[] = (<any>this._typescript.service).getAllSyntacticDiagnostics();
369
            if (diag && diag.length) {
370
              msg = 'Building ' + this.docState.fullPath() + ' ' + TypeScript.EmitOutputResult[emits.emitOutputResult] + '\n' +
371
                diag.map(d => d.line() + ':' + d.character() + ' ' + d.message()).join('\n');
372
            }
373
          }
374
          catch (error) {  }
375
        }
376
        
377
        alert(msg);
378
      }
379
      
380
      this._typescript.log = null;
381
370:16 local var TypeScript.Diagnostic[]